package com.zsc.wxm.ysh.anjo.es.service;

import com.zsc.wxm.ysh.anjo.service.base.model.es.vo.EsDataVO;

import java.io.IOException;
import java.util.List;

/**
 * 描述：
 *
 * @author playmaker
 * @since 2021/2/14 9:49
 */
public interface UploadService {

    /**
     * 上传爬取的图片
     */
    void uploadHouseImage();


    /**
     * 导入爬虫爬取的房源数据到ES中
     *
     * @param list 数据
     * @throws IOException 异常
     * @return true or false
     */
    boolean uploadHouseResourcesByCrawler(List<EsDataVO> list) throws IOException;

    /**
     * 创建或者修改数据
     *
     * @param houseId 房源id
     */
    void createOrUpdateData(Long houseId);

    /**
     * 根据房源id移除数据
     *
     * @param houseId 房源id
     */
    void removeData(Long houseId) throws IOException;
}
